<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
 <div>
    <ul>
        <!--v-for循环遍历指令,遍历的过程中生成当前元素-->
        <li v-for="name in arr">{{name}}</li>
    </ul>
     <p v-for="name in arr">{{name}}</p>
     <h1 v-for="name in arr">{{name}}</h1>
     <p v-for="p in person">名字:{{p.name}},年龄:{{p.age}},类型:{{p.type}}</p>
     <table border="1">
         <caption>英雄列表</caption>
         <tr>
             <th>名字</th>
             <th>年龄</th>
             <th>类型</th>
         </tr>
         <tr v-for="p in person">
             <td>{{p.name}}</td>
             <td>{{p.age}}</td>
             <td>{{p.type }}</td>
         </tr>
     </table>
 </div>

<script src="https://cdn.staticfile.org/vue/2.2.2/vue.min.js"></script>
 <script>
     let v=new Vue({
              el:"div",
              data:{
                  arr:["刘备","关羽","诸葛亮","孙尚香","刘婵"],
                  person:[{name:"刘备",age:"50",type:"战士"},
                      {name:"孙尚香",age:"20",type:"射手"},
                      {name:"诸葛亮",age:"30",type:"法师"}]
              },
              methods:{

              }
          })
 </script>
</body>
</html>